﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs" Inherits="NJL.WebManage.ChangePassword" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function checkCode() {
            var txtOldPwd = document.getElementById("<%=txtOldPwd.ClientID %>").value;
            var txtNewPwd = document.getElementById("<%=txtNewPwd.ClientID %>").value;
            var txtConfirmPwd = document.getElementById("<%=txtConfirmPwd.ClientID %>").value;
            if (txtOldPwd == "") {
                alert("请输入原始密码");
                return false;
            }
            if (txtNewPwd == "") {
                alert("请输入新密码");
                return false;
            }
            if (txtConfirmPwd == "") {
                alert("请输入确认密码");
                return false;
            }
            if (txtNewPwd.length < 6 | txtNewPwd.length > 20) {
                alert("您输入的密码长度必须在6-20为之间");
                return false;
            }
            if (txtNewPwd != txtConfirmPwd) {
                alert("两次输入密码不一致，请重新输入");
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
     <div class="gray_bd">
        <div class="table_title">
             个人管理-修改密码</div>
        <div class="pad5px">
            <table align="center" cellspacing="0" style="width: 100%">
                <tr>
                    <td style="width: 120px; text-align: right;">
                        原始密码:
                    </td>
                    <td>
                        <asp:TextBox ID="txtOldPwd" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        新密码:
                    </td>
                    <td>
                        <asp:TextBox ID="txtNewPwd" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        确认密码:
                    </td>
                    <td>

                        <asp:TextBox ID="txtConfirmPwd" runat="server" TextMode="Password"></asp:TextBox>

                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
  
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnSubmit" runat="server" Text="提交" onclick="btnSubmit_Click"  OnClientClick="return checkCode()"/>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
